package com.shiwaixiangcun.customer.adapter;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shiwaixiangcun.customer.R;
import com.shiwaixiangcun.customer.entity.CameraShareInfo;
import com.shiwaixiangcun.customer.glide.ImageDisplayUtil;
import com.shiwaixiangcun.customer.widget.RoundImageView;

import java.util.List;

/**
 * Author   Administrator
 * Date     2017/12/25
 * Desc     eg
 *
 * @author Administrator
 */

public class AdapterShareCamera extends BaseQuickAdapter<CameraShareInfo, BaseViewHolder> {
    public AdapterShareCamera(@Nullable List<CameraShareInfo> data) {
        super(R.layout.item_share_camera, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, CameraShareInfo item) {
        helper.setText(R.id.tv_title, item.getCustomerName());
        helper.setText(R.id.tv_content, item.getPhone());
        helper.addOnClickListener(R.id.tv_cancel);
        RoundImageView civ = helper.getView(R.id.iv_avatar);
        ImageDisplayUtil.showImageView(mContext, item.getAvatar(), civ);

    }
}
